#pragma once

class FnSkBitmap
{
public:
	FnSkBitmap(void);
	~FnSkBitmap(void);

	static  bool		DrawSkBitmap( const SkBitmap *skBitmap, HDC hdc, int x = 0, int y = 0, int sx = 0, int sy = 0, int cx = 0, int cy = 0);

	static	SkBitmap*	CreateSkBitmap(LPBYTE pMemory,LONG nSize);
	static  SkBitmap*   CreateSkBitmap(BITMAP bm);
	static  SkBitmap*   CreateSkBitmap(HBITMAP hbm);
	static	SkBitmap*	CreateSkBitmap(LPCTSTR szFile);
	static	SkBitmap*	CreateSkBitmap(HDC hdc, int cx = 0, int cy = 0);
	static	SkBitmap*	CreateSkBitmap(HINSTANCE hInst,LPCTSTR szType,UINT nID);

	static	BOOL		SaveSkBitmap(SkBitmap* skBitmap, LPCTSTR szFilePath, SkImageEncoder::Type type = SkImageEncoder::kPNG_Type);
	static	BOOL		SaveSkBitmap( SkCanvas* pCanvas, LPCTSTR szFilePath,SkImageEncoder::Type type = SkImageEncoder::kPNG_Type);
};